#include "stdafx.h"
#include "Headers.h"
#include "LocalDataFun.h"
#include "GameFunctions.h"

void LoadGameFile()
{
	
}

void Init_TITLEFunction(GameNode *gn)
{
#ifdef ERROR_MESSAGES
	pConsole->Color(RGB(0,0,0));
#endif

	gn->WorldWidth(640);
	gn->WorldHeight(480);

	gn->FPStoMS(60);
	gn->QuitOnEscape(true);
	gn->ShowScrollingBoundingBox(false);

	gn->viewPort.ViewPortScrollingBB(0,0,640,480);

	gn->viewPort.WorldXPos(0);
	gn->viewPort.WorldYPos(0);
	gn->viewPort.MaxInflateBBLeft(0);
	gn->viewPort.MaxInflateBBTop(0);
	gn->viewPort.MaxInflateBBRight(0);
	gn->viewPort.MaxInflateBBBottom(0);

	gn->viewPort.ViewPortWidth(640);
	gn->viewPort.ViewPortHeight(480);

	Map mTITLE("TITLE","title.bmp",Map::MASTERMAP,0,0,0);
	mTITLE.SpeedX(0.00);
	mTITLE.SpeedY(0.00);
	mTITLE.behavior.AddFunction(FN_TITLESCREEN);
	mTITLE.UseTransparency(false);
	mTITLE.Visible(true);
	mTITLE.Unused(false);
	mTITLE.Pause(false);
	mTITLE.SpacePartitionGridSize(128);
	mTITLE.ShowMapCollision(false);
	gn->Add(mTITLE);


};

void End_TITLEFunction(GameNode *gn)
{
	

};

void Exit_TITLEFunction(GameNode *gn)
{
};

void Init_LOADOUT_SCREENFunction(GameNode *gn)
{
#ifdef ERROR_MESSAGES
	pConsole->Color(RGB(0,0,0));
#endif

	gn->WorldWidth(640);
	gn->WorldHeight(480);

	gn->FPStoMS(60);
	gn->QuitOnEscape(true);
	gn->ShowScrollingBoundingBox(false);

	gn->viewPort.ViewPortScrollingBB(0,0,640,480);

	gn->viewPort.WorldXPos(0);
	gn->viewPort.WorldYPos(0);
	gn->viewPort.MaxInflateBBLeft(0);
	gn->viewPort.MaxInflateBBTop(0);
	gn->viewPort.MaxInflateBBRight(0);
	gn->viewPort.MaxInflateBBBottom(0);

	gn->viewPort.ViewPortWidth(640);
	gn->viewPort.ViewPortHeight(480);

	pFunCursor = NewFunCursor();
	pFunCursor->AddSpriteCursor(DEFAULT_CURSOR,0,0,LOOSECOLLISION);
	pFunCursor->ViewportPosition(gn->viewPort.Width()/2,gn->viewPort.Height()/2);
	myGame->ShowCursor(true);


	Map mLOADOUT_SCREEN("LOADOUT_SCREEN","loadout background.bmp",Map::MASTERMAP,0,0,0);
	mLOADOUT_SCREEN.SpeedX(0.00);
	mLOADOUT_SCREEN.SpeedY(0.00);
	mLOADOUT_SCREEN.behavior.AddFunction(FN_TITLESCREEN);
	mLOADOUT_SCREEN.UseTransparency(false);
	mLOADOUT_SCREEN.Visible(true);
	mLOADOUT_SCREEN.Unused(false);
	mLOADOUT_SCREEN.Pause(false);
	mLOADOUT_SCREEN.SpacePartitionGridSize(128);
	mLOADOUT_SCREEN.ShowMapCollision(false);
	gn->Add(mLOADOUT_SCREEN);

	Sprite sButton_Swarm447175327804;
	sButton_Swarm447175327804.Name("Button_Swarm");
	sButton_Swarm447175327804.Visible(true);
	sButton_Swarm447175327804.Unused(false);
	sButton_Swarm447175327804.Pause(true);
	sButton_Swarm447175327804.Reflection(false);
	sButton_Swarm447175327804.MainCharacter(false);
	sButton_Swarm447175327804.BelongToMap("LOADOUT_SCREEN");
	sButton_Swarm447175327804.ActorIndex(4);
	sButton_Swarm447175327804.Animation(0);
	sButton_Swarm447175327804.Frame(4);
	sButton_Swarm447175327804.PegRegistered(false);
	sButton_Swarm447175327804.ZOrder(0);
	sButton_Swarm447175327804.MapPositionX(60);
	sButton_Swarm447175327804.MapPositionY(325);
	sButton_Swarm447175327804.CheckCollisionWithMap(false);
	sButton_Swarm447175327804.DisplayListNumber(0);
	sButton_Swarm447175327804.Friction(0);
	sButton_Swarm447175327804.ActivateCollisionWithSprite(false);
	sButton_Swarm447175327804.VectorDirection(0,0,0);
	sButton_Swarm447175327804.ShowVectorOfTranslation(false);
	sButton_Swarm447175327804.CollisionType(LOOSECOLLISION);
	sButton_Swarm447175327804.Speed((float)0.00);
	sButton_Swarm447175327804.VariableNumber(0);
	sButton_Swarm447175327804.ShowSpriteBoundingBox(false);
	sButton_Swarm447175327804.ShowSpriteCollision(false);
	sButton_Swarm447175327804.Gravity(false);
	gn->Add(sButton_Swarm447175327804);

	Sprite sButton_Soldier447247707831;
	sButton_Soldier447247707831.Name("Button_Soldier");
	sButton_Soldier447247707831.Visible(true);
	sButton_Soldier447247707831.Unused(false);
	sButton_Soldier447247707831.Pause(true);
	sButton_Soldier447247707831.Reflection(false);
	sButton_Soldier447247707831.MainCharacter(false);
	sButton_Soldier447247707831.BelongToMap("LOADOUT_SCREEN");
	sButton_Soldier447247707831.ActorIndex(4);
	sButton_Soldier447247707831.Animation(0);
	sButton_Soldier447247707831.Frame(3);
	sButton_Soldier447247707831.PegRegistered(false);
	sButton_Soldier447247707831.ZOrder(0);
	sButton_Soldier447247707831.MapPositionX(190);
	sButton_Soldier447247707831.MapPositionY(325);
	sButton_Soldier447247707831.CheckCollisionWithMap(false);
	sButton_Soldier447247707831.DisplayListNumber(0);
	sButton_Soldier447247707831.Friction(0);
	sButton_Soldier447247707831.ActivateCollisionWithSprite(false);
	sButton_Soldier447247707831.VectorDirection(0,0,0);
	sButton_Soldier447247707831.ShowVectorOfTranslation(false);
	sButton_Soldier447247707831.CollisionType(LOOSECOLLISION);
	sButton_Soldier447247707831.Speed((float)0.00);
	sButton_Soldier447247707831.VariableNumber(0);
	sButton_Soldier447247707831.ShowSpriteBoundingBox(false);
	sButton_Soldier447247707831.ShowSpriteCollision(false);
	sButton_Soldier447247707831.Gravity(false);
	gn->Add(sButton_Soldier447247707831);

	Sprite sButton_Overlord447324147853;
	sButton_Overlord447324147853.Name("Button_Overlord");
	sButton_Overlord447324147853.Visible(true);
	sButton_Overlord447324147853.Unused(false);
	sButton_Overlord447324147853.Pause(true);
	sButton_Overlord447324147853.Reflection(false);
	sButton_Overlord447324147853.MainCharacter(false);
	sButton_Overlord447324147853.BelongToMap("LOADOUT_SCREEN");
	sButton_Overlord447324147853.ActorIndex(4);
	sButton_Overlord447324147853.Animation(0);
	sButton_Overlord447324147853.Frame(2);
	sButton_Overlord447324147853.PegRegistered(false);
	sButton_Overlord447324147853.ZOrder(0);
	sButton_Overlord447324147853.MapPositionX(320);
	sButton_Overlord447324147853.MapPositionY(325);
	sButton_Overlord447324147853.CheckCollisionWithMap(false);
	sButton_Overlord447324147853.DisplayListNumber(0);
	sButton_Overlord447324147853.Friction(0);
	sButton_Overlord447324147853.ActivateCollisionWithSprite(false);
	sButton_Overlord447324147853.VectorDirection(0,0,0);
	sButton_Overlord447324147853.ShowVectorOfTranslation(false);
	sButton_Overlord447324147853.CollisionType(LOOSECOLLISION);
	sButton_Overlord447324147853.Speed((float)0.00);
	sButton_Overlord447324147853.VariableNumber(0);
	sButton_Overlord447324147853.ShowSpriteBoundingBox(false);
	sButton_Overlord447324147853.ShowSpriteCollision(false);
	sButton_Overlord447324147853.Gravity(false);
	gn->Add(sButton_Overlord447324147853);

	Sprite sButton_Creeper447388737876;
	sButton_Creeper447388737876.Name("Button_Creeper");
	sButton_Creeper447388737876.Visible(true);
	sButton_Creeper447388737876.Unused(false);
	sButton_Creeper447388737876.Pause(true);
	sButton_Creeper447388737876.Reflection(false);
	sButton_Creeper447388737876.MainCharacter(false);
	sButton_Creeper447388737876.BelongToMap("LOADOUT_SCREEN");
	sButton_Creeper447388737876.ActorIndex(4);
	sButton_Creeper447388737876.Animation(0);
	sButton_Creeper447388737876.Frame(1);
	sButton_Creeper447388737876.PegRegistered(false);
	sButton_Creeper447388737876.ZOrder(0);
	sButton_Creeper447388737876.MapPositionX(450);
	sButton_Creeper447388737876.MapPositionY(325);
	sButton_Creeper447388737876.CheckCollisionWithMap(false);
	sButton_Creeper447388737876.DisplayListNumber(0);
	sButton_Creeper447388737876.Friction(0);
	sButton_Creeper447388737876.ActivateCollisionWithSprite(false);
	sButton_Creeper447388737876.VectorDirection(0,0,0);
	sButton_Creeper447388737876.ShowVectorOfTranslation(false);
	sButton_Creeper447388737876.CollisionType(LOOSECOLLISION);
	sButton_Creeper447388737876.Speed((float)0.00);
	sButton_Creeper447388737876.VariableNumber(0);
	sButton_Creeper447388737876.ShowSpriteBoundingBox(false);
	sButton_Creeper447388737876.ShowSpriteCollision(false);
	sButton_Creeper447388737876.Gravity(false);
	gn->Add(sButton_Creeper447388737876);


};

void End_LOADOUT_SCREENFunction(GameNode *gn)
{
	

};

void Exit_LOADOUT_SCREENFunction(GameNode *gn)
{
};

void Init_GAMEPLAYFunction(GameNode *gn)
{
#ifdef ERROR_MESSAGES
	pConsole->Color(RGB(0,0,0));
#endif

	gn->WorldWidth(640);
	gn->WorldHeight(480);

	gn->FPStoMS(60);
	gn->QuitOnEscape(true);
	gn->ShowScrollingBoundingBox(false);

	gn->viewPort.ViewPortScrollingBB(0,0,640,480);

	gn->viewPort.WorldXPos(0);
	gn->viewPort.WorldYPos(0);
	gn->viewPort.MaxInflateBBLeft(0);
	gn->viewPort.MaxInflateBBTop(0);
	gn->viewPort.MaxInflateBBRight(0);
	gn->viewPort.MaxInflateBBBottom(0);

	gn->viewPort.ViewPortWidth(640);
	gn->viewPort.ViewPortHeight(480);

	pFunCursor = NewFunCursor();
	pFunCursor->AddSpriteCursor(DEFAULT_CURSOR,0,0,LOOSECOLLISION);
	pFunCursor->ViewportPosition(gn->viewPort.Width()/2,gn->viewPort.Height()/2);
	myGame->ShowCursor(true);


	Map mGAMEPLAY("GAMEPLAY","map.bmp",Map::MASTERMAP,0,0,0);
	mGAMEPLAY.SpeedX(0.00);
	mGAMEPLAY.SpeedY(0.00);
	mGAMEPLAY.behavior.AddTimer(TIMER_GAMEPLAY,true);
	mGAMEPLAY.UseTransparency(false);
	mGAMEPLAY.Visible(true);
	mGAMEPLAY.Unused(false);
	mGAMEPLAY.Pause(false);
	mGAMEPLAY.SpacePartitionGridSize(128);
	mGAMEPLAY.ShowMapCollision(false);
	gn->Add(mGAMEPLAY);

	Sprite sGround8010173267;
	sGround8010173267.Name("Ground");
	sGround8010173267.Visible(false);
	sGround8010173267.Unused(true);
	sGround8010173267.Pause(true);
	sGround8010173267.Reflection(false);
	sGround8010173267.MainCharacter(false);
	sGround8010173267.BelongToMap("GAMEPLAY");
	sGround8010173267.ActorIndex(1);
	sGround8010173267.Animation(0);
	sGround8010173267.Frame(0);
	sGround8010173267.PegRegistered(false);
	sGround8010173267.ZOrder(0);
	sGround8010173267.MapPositionX(0);
	sGround8010173267.MapPositionY(0);
	sGround8010173267.CheckCollisionWithMap(false);
	sGround8010173267.DisplayListNumber(0);
	sGround8010173267.Friction(0);
	sGround8010173267.ActivateCollisionWithSprite(false);
	sGround8010173267.VectorDirection(0,0,0);
	sGround8010173267.ShowVectorOfTranslation(false);
	sGround8010173267.CollisionType(LOOSECOLLISION);
	sGround8010173267.Speed((float)0.00);
	sGround8010173267.VariableNumber(0);
	sGround8010173267.ShowSpriteBoundingBox(false);
	sGround8010173267.ShowSpriteCollision(false);
	sGround8010173267.Gravity(false);
	gn->Add(sGround8010173267);

	Sprite sWall8010354267;
	sWall8010354267.Name("Wall");
	sWall8010354267.Visible(false);
	sWall8010354267.Unused(true);
	sWall8010354267.Pause(true);
	sWall8010354267.Reflection(false);
	sWall8010354267.MainCharacter(false);
	sWall8010354267.BelongToMap("GAMEPLAY");
	sWall8010354267.ActorIndex(2);
	sWall8010354267.Animation(0);
	sWall8010354267.Frame(0);
	sWall8010354267.PegRegistered(false);
	sWall8010354267.ZOrder(1);
	sWall8010354267.MapPositionX(0);
	sWall8010354267.MapPositionY(0);
	sWall8010354267.CheckCollisionWithMap(false);
	sWall8010354267.DisplayListNumber(0);
	sWall8010354267.Friction(0);
	sWall8010354267.ActivateCollisionWithSprite(false);
	sWall8010354267.VectorDirection(0,0,0);
	sWall8010354267.ShowVectorOfTranslation(false);
	sWall8010354267.CollisionType(LOOSECOLLISION);
	sWall8010354267.Speed((float)0.00);
	sWall8010354267.VariableNumber(0);
	sWall8010354267.ShowSpriteBoundingBox(false);
	sWall8010354267.ShowSpriteCollision(false);
	sWall8010354267.Gravity(false);
	gn->Add(sWall8010354267);

	Sprite sEnemy28421449796;
	sEnemy28421449796.Name("Enemy");
	sEnemy28421449796.Visible(false);
	sEnemy28421449796.Unused(true);
	sEnemy28421449796.Pause(true);
	sEnemy28421449796.Reflection(false);
	sEnemy28421449796.MainCharacter(false);
	sEnemy28421449796.BelongToMap("GAMEPLAY");
	sEnemy28421449796.ActorIndex(5);
	sEnemy28421449796.Animation(0);
	sEnemy28421449796.Frame(0);
	sEnemy28421449796.PegRegistered(false);
	sEnemy28421449796.ZOrder(1);
	sEnemy28421449796.MapPositionX(0);
	sEnemy28421449796.MapPositionY(0);
	sEnemy28421449796.CheckCollisionWithMap(false);
	sEnemy28421449796.DisplayListNumber(0);
	sEnemy28421449796.Friction(0);
	sEnemy28421449796.ActivateCollisionWithSprite(false);
	sEnemy28421449796.AddLocalVariable(LD_OBJDATA);
	sEnemy28421449796.behavior.AddFunction(FN_AICONTROLLER);
	sEnemy28421449796.behavior.AddFunction(FN_UPDATEOBJMAP);
	sEnemy28421449796.VectorDirection(0,0,0);
	sEnemy28421449796.ShowVectorOfTranslation(false);
	sEnemy28421449796.CollisionType(LOOSECOLLISION);
	sEnemy28421449796.Speed((float)10.00);
	sEnemy28421449796.VariableNumber(0);
	sEnemy28421449796.ShowSpriteBoundingBox(false);
	sEnemy28421449796.ShowSpriteCollision(false);
	sEnemy28421449796.Gravity(false);
	gn->Add(sEnemy28421449796);


};

void End_GAMEPLAYFunction(GameNode *gn)
{
	

};

void Exit_GAMEPLAYFunction(GameNode *gn)
{
};

void Init_SPEC_TREEFunction(GameNode *gn)
{
#ifdef ERROR_MESSAGES
	pConsole->Color(RGB(0,0,0));
#endif

	gn->WorldWidth(640);
	gn->WorldHeight(480);

	gn->FPStoMS(60);
	gn->QuitOnEscape(true);
	gn->ShowScrollingBoundingBox(false);

	gn->viewPort.ViewPortScrollingBB(0,0,640,480);

	gn->viewPort.WorldXPos(0);
	gn->viewPort.WorldYPos(0);
	gn->viewPort.MaxInflateBBLeft(0);
	gn->viewPort.MaxInflateBBTop(0);
	gn->viewPort.MaxInflateBBRight(0);
	gn->viewPort.MaxInflateBBBottom(0);

	gn->viewPort.ViewPortWidth(640);
	gn->viewPort.ViewPortHeight(480);

};

void End_SPEC_TREEFunction(GameNode *gn)
{
	

};

void Exit_SPEC_TREEFunction(GameNode *gn)
{
};

